package com.example.order.feign;


import com.example.order.feign.fallback.ProductFeignClientFallback;
import com.example.product.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-product", contextId = "product-info", fallback = ProductFeignClientFallback.class)
public interface ProductFeignClient {


    @GetMapping("/product/{id}")
    Product getProductById(@PathVariable("id") Long productId);
}
